package c_gs

import (
	"cade/src/bot/msg"
	"cade/src/core/log"
	Err "cade/src/proto/errorcode"
)

func GS_ChatGetRoomList_R(message msg.Message, ctx interface{}) {
	req := message.(*msg.GS_ChatGetRoomList_R)
	// bot := ctx.(*app.Bot)

	if req.ErrorCode != Err.OK {
		log.Error("get room list failed")
		return
	}

	log.Info("room list:")
	for _, rm := range req.Rooms {
		log.Infof("    id: %d, name: %s, num: %d\n", rm.Id, rm.Name, rm.Num)
	}
}
